﻿using CK.Project.Web.Application;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace CK.Project.Web.WebAPI.Controllers
{
    /// <summary>
    /// 用户控制器(即对外的API接口)
    /// </summary>
    public class UserController : ApiController
    {
        /// <summary>
        /// 用户
        /// </summary>
        private readonly IUserAppService userAppService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userAppService"></param>
        public UserController(IUserAppService userAppService)
        {
            this.userAppService = userAppService;
        }

        /// <summary>
        /// 查询用户列表
        /// </summary>
        /// <param name="userListDto"></param>
        /// <returns></returns>
        [HttpGet]
        public OUserListDto UserList([FromUri]UserListDto userListDto)
        {
            return userAppService.UserList(userListDto);
        }
    }
}
